import 'package:ati_package/core/utils/ati_color.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class AtiIconBtn extends StatelessWidget {
  // 添加 onTap 事件处理
  final VoidCallback? onPressed;
  final String? titleStr;
  final Color? contenColor;
  const AtiIconBtn({
    super.key,
    required this.onPressed,
    this.titleStr,
    this.contenColor,
  });

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.all(0.r),
      child: InkWell(
        onTap: onPressed, // 点击事件
        child: Row(
          mainAxisAlignment: MainAxisAlignment.end, // 右对齐
          children: [
            Text(
              '查看详情',
              style: TextStyle(
                color: contenColor ?? AtiColor.textColor1,
                fontSize: 14.r,
                fontWeight: FontWeight.w500,
              ),
            ),
            Icon(
              Icons.arrow_forward_ios,
              size: 14.r,
              color: contenColor ?? AtiColor.textColor1,
            ),
          ],
        ),
      ),
    );
  }
}
